package cn.learn.testmongo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;
@SpringBootApplication
public class TestMongoApplication {

    public static void main(String[] args) {
        ApplicationContext ctx =   SpringApplication.run(TestMongoApplication.class, args);
        //日志打印系统自动化配置的bean
        String[] beanNames = ctx.getBeanDefinitionNames();
        Arrays.sort(beanNames);
        for (String beanName : beanNames) {
            System.out.println("Spring Boot2.5自动化配置："+beanName);
        }
    }

}
